<?php

namespace app\admin\logic;

use app\common\logic\BaseLogic;

class CommonLogic extends BaseLogic
{
    public function file($request)
    {
        $file = request()->file('project_detail');

        $res = \think\facade\Filesystem::disk('public')->putFile('project/detail', $file);

        if ($res) {
            return $this->responseSuccess('success', ['url' => config('app.upload_host') . $res, 'path' => '']);
        } else {
            return $this->responseError(['操作失败']);
        }
    }


}